﻿using SqlSugar;
using System;

namespace ADSTS_SERVER.Models
{
    /// <summary>
    /// 测试用例表
    /// </summary>
    [SugarTable("testusecase", TableDescription = "测试用例表")]
    public class TestUseCase
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id", ColumnDescription = "主键ID")]
        public long Id { get; set; }

        /// <summary>
        /// 编号
        /// </summary>
        [SugarColumn(ColumnName = "number", ColumnDescription = "编号")]
        public string Number { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(ColumnName = "name", ColumnDescription = "名称")]
        public string Name { get; set; }

        /// <summary>
        /// 脚本
        /// </summary>
        [SugarColumn(ColumnName = "script", ColumnDataType = "text", ColumnDescription = "脚本")]
        public string Script { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(ColumnName = "uid", ColumnDescription = "用户ID")]
        public long UId { get; set; }

        /// <summary>
        /// 用户信息
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public User User { get; set; }

        /// <summary>
        /// 是否激活数据 1-是 0-否
        /// </summary>
        [SugarColumn(ColumnName = "isactive", ColumnDescription = "是否激活数据 1-是 0-否")]
        public int IsActive { get; set; } = 1;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "created", IsOnlyIgnoreUpdate = true)]
        public DateTime Created { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>        
        [SugarColumn(ColumnName = "updated")]
        public DateTime Updated { get; set; } = DateTime.Now;
    }
}
